﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NamingOnLessonEntity.Base;
using NamingOnLessonUtility;

namespace NamingOnLessonEntity
{
    /// <summary>
    /// 用户
    /// </summary>
    public class User : BaseEntity
    {
        public string SYSID { set; get; }
        public string Name { set; get; }
        public string Pass { set; get; }
        public string No { set; get; }
        /// <summary>
        /// 用户类型（1：管理员、2：老师）
        /// </summary>
        public int UserType { set; get; }
        /// <summary>
        /// 是否为超级管理员（1：是、0否）
        /// </summary>
        public bool isSystem { set; get; }


        public override void Create()
        {
            this.SYSID = CommonHelper.GetGuid();
            this.Pass = MD5Helper.GetMD5Code("123456");
            this.CreateTime = DateTime.Now;
            //this.CreateUserName = user.UserName;
            //this.CreateUserId = user.UserID;
        }
        public override void Modify(string keyValue)
        {
            this.SYSID = keyValue;
            this.ModifyTime = DateTime.Now;
            //this.ModifyUserId = user.UserID;
            //this.ModifyUserName = user.UserName;
        }
    }
}
